﻿using System;
using System.Collections.Generic;
using System.Text;

namespace UMC.WorkFlow.Entities
{
    /// <summary>
    /// 流程表单
    /// </summary>
    public  partial class TaskForm : UMC.Data.Record
    {
        /// <summary>
        /// 表单Id
        /// </summary>
        public ulong? TaskId { get; set; }
        /// <summary>
        /// 表单代码
        /// </summary>
        public String Code { get; set; }
        /// <summary>
        /// 表单标题
        /// </summary>
        public String Caption { get; set; }

        /// <summary>
        /// 订单号编辑格式
        /// </summary>
        public String DateFormat { get; set; }
        /// <summary>
        /// 订单号编辑格式
        /// </summary>
        public String PfxFormat { get; set; }
        /// <summary>
        /// 订单号计数方式
        /// </summary>
        public String TotalFormat { get; set; }

        /// <summary>
        /// 关联的流程设计
        /// </summary>
        public ulong? DesignId { get; set; }

        /// <summary>
        /// 标题格式
        /// </summary>
        public string SubjectFormat { get; set; }

        public string ProviderKey { get; set; }

        public int? NoteDate
        {
            get;set;
        }

        public int? NoteTotal
        {
            get; set;
        }
    }
    /// <summary>
    /// 
    /// </summary>
    public enum ControlType
    {
        /// <summary>
        /// 只读
        /// </summary>
        Readonly = -1,
        /// <summary>
        /// 文本输入
        /// </summary>
        Text = 0,
        /// <summary>
        /// 选择
        /// </summary>
        Select = 1,
        /// <summary>
        /// 数字
        /// </summary>
        Number = 2,
        /// <summary>
        /// 日期
        /// </summary>
        Date = 4,
        /// <summary>
        /// 扫码
        /// </summary>
        Scaning = 7,
        /// <summary>
        /// 列表
        /// </summary>
        List = 6,
        /// <summary>
        /// 图片
        /// </summary>
        Image = 8,
        /// <summary>
        /// 附件
        /// </summary>
        Attachment = 9,
        /// <summary>
        /// 图标
        /// </summary>
        Icon = 10,
        /// <summary>
        /// 文本框
        /// </summary>
        Areatext = 11

    }
    /// <summary>
    /// 
    /// </summary>
    public partial class TaskFormControl : UMC.Data.Record
    {
        public ulong? ItemId
        {
            set;
            get;
        }

        public ulong? ForId
        {
            set;
            get;
        }
        public ulong? TaskId
        {
            set;
            get;
        }
        public String Code
        {
            set;
            get;
        }
        public String Caption
        {
            set;
            get;
        }
        public String PlaceHolder
        {
            set;
            get;
        }
        public ControlType? Type
        {
            set;
            get;
        }
        public String ValueKey
        {
            set;
            get;
        }
        public int? Seq
        {
            set;
            get;
        }
        public String Tip
        {
            set;
            get;
        }

        /// <summary>
        /// 是否必须输入
        /// </summary>
        public bool? IsRequired
        { get; set; }
        /// <summary>
        /// 必须输入脚本
        /// </summary>
        public string RequiredSQL
        { get; set; }
        /// <summary>
        /// 可见脚本，要可编辑的状态下，再一次检测
        /// </summary>
        public string ShowSQL
        { get; set; }

        /// <summary>
        /// 数据检测脚本，输入好数据的再一次执行脚本，来检测数据有值
        /// </summary>
        public string CheckSQL
        { get; set; }
        /// <summary>
        /// 选择器
        /// </summary>
        public string SelectCommand { get; set; }
        /// <summary>
        /// 明细详情
        /// </summary>
        public string DetailCommand { get; set; }
        public string ValueSQL { get; set; }
    }
}
